var _pst_lc = encodeURIComponent(window.location).substr(0, 512);
var _pst_rf = encodeURIComponent(document.referrer).substr(0, 512);
var _pst_tz = new Date().getTimezoneOffset() / 60;
var _pst_ss = screen.width + ',' + screen.height;
var _pst_sc = getNavName();
var _pst_vp = 1;
var _pst_strck = document.cookie;
if(_pst_strck != null && _pst_strck != '') {
	var _pst_vpck = _pst_strck.match(new RegExp('(^| )_pst_vp=([^;]*)(;|$)'));
	if(_pst_vpck != null) {
		_pst_vp = parseInt(_pst_vpck[2], 10) + 1
	}
}
var _pst_vpcket = new Date();
_pst_vpcket.setTime(_pst_vpcket.getTime() + 60 * 60 * 1000);
document.cookie = '_pst_vp=' + _pst_vp + ';path=/;expires=' + _pst_vpcket.toGMTString();
var _pst_vt = 1;
if(_pst_strck != null && _pst_strck != '') {
	var _pst_vtck = _pst_strck.match(new RegExp('(^| )_pst_vt=([^;]*)(;|$)'));
	if(_pst_vtck != null) {
		if(_pst_vp == 1) {
			_pst_vt = parseInt(_pst_vtck[2], 10) + 1
		} else {
			_pst_vt = parseInt(_pst_vtck[2], 10)
		}
	}
}
var _pst_vtcket = new Date();
_pst_vtcket.setTime(_pst_vtcket.getTime() + 365 * 24 * 60 * 60 * 1000);
document.cookie = '_pst_vt=' + _pst_vt + ';path=/;expires=' + _pst_vtcket.toGMTString();
var _pst_us = get_pst_us_val(_pst_strck);
if(_pst_us == null || _pst_us == '') {
	var _pst_uscket = new Date();
	_pst_us = _pst_uscket.getTime() + '' + Math.random();
	if(_pst_us.length > 32) {
		_pst_us = _pst_us.substr(0, 32)
	} else if(_pst_us.length < 32) {
		var _ch_len = 32 - _pst_us.length;
		for(var j = 0; j < _ch_len; j++) {
			_pst_us += '0'
		}
	}
	_pst_uscket.setTime(_pst_uscket.getTime() + 10 * 365 * 24 * 60 * 60 * 1000);
	document.cookie = '_pst_us=' + _pst_us + ';path=/;expires=' + _pst_uscket.toGMTString()
}
function get_pst_us_val(ck) {
	if(ck == null || ck == '') {
		return ''
	}
	var _pst_ck_us = ck.match(new RegExp('(^| )_pst_us=([^;]*)(;|$)'));
	if(_pst_ck_us == null) {
		return ''
	}
	return _pst_ck_us[2]
}
function getNavName(){
    var Sys = {};
    var ua = navigator.userAgent.toLowerCase();
    var s;
    (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[0] :
    (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[0] :
    (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[0] :
    (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[0] :
    (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[0] : 0;

    //以下进行测试
    if (Sys.ie) return Sys.ie;
    if (Sys.firefox) return Sys.firefox;
    if (Sys.chrome) return Sys.chrome;
    if (Sys.opera) return Sys.opera;
    if (Sys.safari) return Sys.safari;
	
}

//alert("_pst_lc=" + _pst_lc);
//alert("_pst_rf=" +_pst_rf);
//alert("_pst_ss =" +_pst_ss);
//alert("_pst_sc=" + _pst_sc);
//alert("_pst_tz =" +_pst_tz);
//alert("_pst_vp =" +_pst_vp);
//alert("_pst_vt =" +_pst_vt);
//alert("_pst_us=" + _pst_us);
